

lst = [29, 98, 89, 66, 69, 36, 99, 56]

# 快速排序
def quick_sort(lst):
    if len(lst)<=1:
        return lst
    else:
        less = []
        middle = []
        more = []
        for i in range (len(lst)):
            if lst[i] < lst[0]:
                less.append(lst[i])
            elif lst[0] < lst[i]:
                more.append(lst[i])
            else:
                middle.append(lst[i])
        return quick_sort(less) + middle + quick_sort(more)
print(quick_sort(lst))